<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qtpropertybrowser.cpp -->
<head>
  <title>QtProperty Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
</tr></table><h1 class="title">QtProperty Class Reference</h1>
<p>The QtProperty class encapsulates an instance of a property. <a href="#details">More...</a></p>
<pre> #include &lt;QtProperty&gt;</pre><p>Inherited by <a href="qtvariantproperty.html">QtVariantProperty</a>.</p>
<ul>
<li><a href="qtproperty-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#dtor.QtProperty">~QtProperty</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#addSubProperty">addSubProperty</a></b> ( QtProperty * <i>property</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#hasValue">hasValue</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#insertSubProperty">insertSubProperty</a></b> ( QtProperty * <i>property</i>, QtProperty * <i>precedingProperty</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#isEnabled">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#isModified">isModified</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtAbstractPropertyManager * </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#propertyManager">propertyManager</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#propertyName">propertyName</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#removeSubProperty">removeSubProperty</a></b> ( QtProperty * <i>property</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#setEnabled">setEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#setModified">setModified</a></b> ( bool <i>modified</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#setPropertyName">setPropertyName</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#setStatusTip">setStatusTip</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#setToolTip">setToolTip</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#setWhatsThis">setWhatsThis</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#statusTip">statusTip</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QtProperty *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#subProperties">subProperties</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#toolTip">toolTip</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QIcon </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#valueIcon">valueIcon</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#valueText">valueText</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#whatsThis">whatsThis</a></b> () const</td></tr>
</table>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtproperty.html#QtProperty">QtProperty</a></b> ( QtAbstractPropertyManager * <i>manager</i> )</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QtProperty class encapsulates an instance of a property.</p>
<p>Properties are created by objects of <a href="qtabstractpropertymanager.html">QtAbstractPropertyManager</a> subclasses; a manager can create properties of a given type, and is used in conjunction with the <a href="qtabstractpropertybrowser.html">QtAbstractPropertyBrowser</a> class. A property is always owned by the manager that created it, which can be retrieved using the <a href="qtproperty.html#propertyManager">propertyManager</a>() function.</p>
<p>QtProperty contains the most common property attributes, and provides functions for retrieving as well as setting their values:</p>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Getter</th><th>Setter</th></tr></thead>
<tr valign="top" class="odd"><td><a href="qtproperty.html#propertyName">propertyName</a>()</td><td><a href="qtproperty.html#setPropertyName">setPropertyName</a>()</td></tr>
<tr valign="top" class="even"><td><a href="qtproperty.html#statusTip">statusTip</a>()</td><td><a href="qtproperty.html#setStatusTip">setStatusTip</a>()</td></tr>
<tr valign="top" class="odd"><td><a href="qtproperty.html#toolTip">toolTip</a>()</td><td><a href="qtproperty.html#setToolTip">setToolTip</a>()</td></tr>
<tr valign="top" class="even"><td><a href="qtproperty.html#whatsThis">whatsThis</a>()</td><td><a href="qtproperty.html#setWhatsThis">setWhatsThis</a>()</td></tr>
<tr valign="top" class="odd"><td><a href="qtproperty.html#isEnabled">isEnabled</a>()</td><td><a href="qtproperty.html#setEnabled">setEnabled</a>()</td></tr>
<tr valign="top" class="even"><td><a href="qtproperty.html#isModified">isModified</a>()</td><td><a href="qtproperty.html#setModified">setModified</a>()</td></tr>
<tr valign="top" class="odd"><td><a href="qtproperty.html#valueText">valueText</a>()</td><td>Nop</td></tr>
<tr valign="top" class="even"><td><a href="qtproperty.html#valueIcon">valueIcon</a>()</td><td>Nop</td></tr>
</table></p>
<p>It is also possible to nest properties: QtProperty provides the <a href="qtproperty.html#addSubProperty">addSubProperty</a>(), <a href="qtproperty.html#insertSubProperty">insertSubProperty</a>() and <a href="qtproperty.html#removeSubProperty">removeSubProperty</a>() functions to manipulate the set of subproperties. Use the <a href="qtproperty.html#subProperties">subProperties</a>() function to retrieve a property's current set of subproperties. Note that nested properties are not owned by the parent property, i.e&#x2e; each subproperty is owned by the manager that created it.</p>
<p>See also <a href="qtabstractpropertymanager.html">QtAbstractPropertyManager</a> and <a href="qtbrowseritem.html">QtBrowserItem</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QtProperty"></a>QtProperty::QtProperty ( <a href="qtabstractpropertymanager.html">QtAbstractPropertyManager</a> * <i>manager</i> )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Creates a property with the given <i>manager</i>.</p>
<p>This constructor is only useful when creating a custom <a href="qtproperty.html">QtProperty</a> subclass (e.g&#x2e; <a href="qtvariantproperty.html">QtVariantProperty</a>). To create a regular <a href="qtproperty.html">QtProperty</a> object, use the <a href="qtabstractpropertymanager.html#addProperty">QtAbstractPropertyManager::addProperty</a>() function instead.</p>
<p>See also <a href="qtabstractpropertymanager.html#addProperty">QtAbstractPropertyManager::addProperty</a>().</p>
<h3 class="fn"><a name="dtor.QtProperty"></a>QtProperty::~QtProperty ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Destroys this property.</p>
<p>Note that subproperties are detached but not destroyed, i.e&#x2e; they can still be used in another context.</p>
<p>See also <a href="qtabstractpropertymanager.html#clear">QtAbstractPropertyManager::clear</a>().</p>
<h3 class="fn"><a name="addSubProperty"></a>void QtProperty::addSubProperty ( QtProperty * <i>property</i> )</h3>
<p>Appends the given <i>property</i> to this property's subproperties.</p>
<p>If the given <i>property</i> already is added, this function does nothing.</p>
<p>See also <a href="qtproperty.html#insertSubProperty">insertSubProperty</a>() and <a href="qtproperty.html#removeSubProperty">removeSubProperty</a>().</p>
<h3 class="fn"><a name="hasValue"></a>bool QtProperty::hasValue () const</h3>
<p>Returns whether the property has a value.</p>
<p>See also <a href="qtabstractpropertymanager.html#hasValue">QtAbstractPropertyManager::hasValue</a>().</p>
<h3 class="fn"><a name="insertSubProperty"></a>void QtProperty::insertSubProperty ( QtProperty * <i>property</i>, QtProperty * <i>precedingProperty</i> )</h3>
<p>Inserts the given <i>property</i> after the specified <i>precedingProperty</i> into this property's list of subproperties. If <i>precedingProperty</i> is 0, the specified <i>property</i> is inserted at the beginning of the list.</p>
<p>If the given <i>property</i> already is inserted, this function does nothing.</p>
<p>See also <a href="qtproperty.html#addSubProperty">addSubProperty</a>() and <a href="qtproperty.html#removeSubProperty">removeSubProperty</a>().</p>
<h3 class="fn"><a name="isEnabled"></a>bool QtProperty::isEnabled () const</h3>
<p>Returns whether the property is enabled.</p>
<p>See also <a href="qtproperty.html#setEnabled">setEnabled</a>().</p>
<h3 class="fn"><a name="isModified"></a>bool QtProperty::isModified () const</h3>
<p>Returns whether the property is modified.</p>
<p>See also <a href="qtproperty.html#setModified">setModified</a>().</p>
<h3 class="fn"><a name="propertyManager"></a><a href="qtabstractpropertymanager.html">QtAbstractPropertyManager</a> * QtProperty::propertyManager () const</h3>
<p>Returns a pointer to the manager that owns this property.</p>
<h3 class="fn"><a name="propertyName"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtProperty::propertyName () const</h3>
<p>Returns the property's name.</p>
<p>See also <a href="qtproperty.html#setPropertyName">setPropertyName</a>().</p>
<h3 class="fn"><a name="removeSubProperty"></a>void QtProperty::removeSubProperty ( QtProperty * <i>property</i> )</h3>
<p>Removes the given <i>property</i> from the list of subproperties without deleting it.</p>
<p>See also <a href="qtproperty.html#addSubProperty">addSubProperty</a>() and <a href="qtproperty.html#insertSubProperty">insertSubProperty</a>().</p>
<h3 class="fn"><a name="setEnabled"></a>void QtProperty::setEnabled ( bool <i>enable</i> )</h3>
<p>Enables or disables the property according to the passed <i>enable</i> value.</p>
<p>See also <a href="qtproperty.html#isEnabled">isEnabled</a>().</p>
<h3 class="fn"><a name="setModified"></a>void QtProperty::setModified ( bool <i>modified</i> )</h3>
<p>Sets the property's modified state according to the passed <i>modified</i> value.</p>
<p>See also <a href="qtproperty.html#isModified">isModified</a>().</p>
<h3 class="fn"><a name="setPropertyName"></a>void QtProperty::setPropertyName ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>name</i> )</h3>
<p>Sets the property's name to the given <i>name</i>.</p>
<p>See also <a href="qtproperty.html#propertyName">propertyName</a>().</p>
<h3 class="fn"><a name="setStatusTip"></a>void QtProperty::setStatusTip ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Sets the property's status tip to the given <i>text</i>.</p>
<p>See also <a href="qtproperty.html#statusTip">statusTip</a>().</p>
<h3 class="fn"><a name="setToolTip"></a>void QtProperty::setToolTip ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Sets the property's tool tip to the given <i>text</i>.</p>
<p>See also <a href="qtproperty.html#toolTip">toolTip</a>().</p>
<h3 class="fn"><a name="setWhatsThis"></a>void QtProperty::setWhatsThis ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Sets the property's &quot;What's This&quot; help text to the given <i>text</i>.</p>
<p>See also <a href="qtproperty.html#whatsThis">whatsThis</a>().</p>
<h3 class="fn"><a name="statusTip"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtProperty::statusTip () const</h3>
<p>Returns the property's status tip.</p>
<p>See also <a href="qtproperty.html#setStatusTip">setStatusTip</a>().</p>
<h3 class="fn"><a name="subProperties"></a><a href="http://qt.nokia.com/doc/4.6/qlist.html">QList</a>&lt;QtProperty *&gt; QtProperty::subProperties () const</h3>
<p>Returns the set of subproperties.</p>
<p>Note that subproperties are not owned by <i>this</i> property, but by the manager that created them.</p>
<p>See also <a href="qtproperty.html#insertSubProperty">insertSubProperty</a>() and <a href="qtproperty.html#removeSubProperty">removeSubProperty</a>().</p>
<h3 class="fn"><a name="toolTip"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtProperty::toolTip () const</h3>
<p>Returns the property's tool tip.</p>
<p>See also <a href="qtproperty.html#setToolTip">setToolTip</a>().</p>
<h3 class="fn"><a name="valueIcon"></a><a href="http://qt.nokia.com/doc/4.6/qicon.html">QIcon</a> QtProperty::valueIcon () const</h3>
<p>Returns an icon representing the current state of this property.</p>
<p>If the given property type can not generate such an icon, this function returns an invalid icon.</p>
<p>See also <a href="qtabstractpropertymanager.html#valueIcon">QtAbstractPropertyManager::valueIcon</a>().</p>
<h3 class="fn"><a name="valueText"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtProperty::valueText () const</h3>
<p>Returns a string representing the current state of this property.</p>
<p>If the given property type can not generate such a string, this function returns an empty string.</p>
<p>See also <a href="qtabstractpropertymanager.html#valueText">QtAbstractPropertyManager::valueText</a>().</p>
<h3 class="fn"><a name="whatsThis"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtProperty::whatsThis () const</h3>
<p>Returns the property's &quot;What's This&quot; help text.</p>
<p>See also <a href="qtproperty.html#setWhatsThis">setWhatsThis</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
</tr></table></div></address></body>
</html>
